<form method="post"  action="">
    请输入一个数：  <input type="text" name="num"><br />
    <input type="submit" name="button" value="判断奇偶数">
</form>
<?php
  header("Content-type:text/html;charset=utf-8");
  //  echo "锄禾日当晚",'<br>' ;
   // echo"111111","<br>";
    //echo 11111,"<br>";
  //echo true,"<br>";
  // echo false;


    //print(true);
    //print(false);
    //echo(5+2)."\n","<hr />";
    //echo(5-2)."\n";
    //$unm=PHP_INT_MAX;
    //var_dump($num);
    //echo'<br><br>';
    //var_dump($num+1);
    //$name='贺飞';
    //echo"{$name}我的名字叫","<br>";
    //echo'$name我的名字叫','<br>';
    //$stu=array('tom','berry','ketty','rose');
    //echo $stu[0],'<br>',$stu[1],'<br>',$stu[2],'<hr>',$stu[3],'<br>';
    //if(10<>2 and 10<>5){
     // echo 'flase';

   /// }
     // $array= array(1=>'a','b','c','d');
     // print_r($array);
      //$array= array(1=>'a',1=>'b',1=>'c','d');
      //print_r($array);
      //var_dump((int)12.9);
      //var_dump((float)12);
      //var_dump((string)12);
    //echo"<hr>";
    //var_dump((bool)1);
   // var_dump((bool)0);
    //var_dump((bool)-10);
    /*echo"<hr>";
    var_dump((bool)'');
    var_dump((bool)'0');
    var_dump((bool)'0.0');
    var_dump((bool)'00');
    var_dump((bool)'false');
    var_dump((bool)'null');
    echo'<br>';
    var_dump((bool)1.1);
    var_dump((bool)0.0);
    var_dump((bool)-1.1);
     echo'<hr>';
    var_dump((bool)'');
    echo"<hr>";*/
    /*$a =5%2;
    echo $a;
    echo"<hr>";
   $b = 6;
    echo $b;
    echo "<br>";
    echo$b++;
    echo'<hr>';
    echo++$b;*/
    //echo"<br>";



    /*if(isset($_POST['button'])) {
      $ch=$_POST['ch'];
      $math=$_POST['math'];
      if($ch=='' || !is_numeric($ch) || $ch<0  ||  $ch>100) {
      echo '语文成绩必须在0-100之间';
      }
      elseif($math=='' || !is_numeric($math)  ||  !($math>=0  &&  $math<=100)) {
        echo'数学成绩必须在0-100之间';
      }
      else {
        $avg=($ch+$math)/2;
        echo "您的平均分是：{$avg}<br>";
        if($avg>=90) {
          echo'孩子，你是我的骄傲！';
        }
        elseif($avg>=80) {
          echo'好样的，宝贝！';
        }
        elseif($avg>=70) {
          echo'你离优秀不远了！';
        }
        elseif($avg>=60) {
          echo'你还是很有潜力的！';
        }
        else {
          echo'看来你不努力是不行了';
        }
      }
    }*/




    /*$a=4;
    $b=5;
    if($a<1){
      echo"111";
    }elseif($b>6){
      echo"222";
    }elseif($b>$a){
      echo'6666';
    }*/



    /*if(isset($_POST['bt1'])){
      $year=$_POST['year'];
      if($year=='' ||  !is_numeric($year)  ||  $year<=0)  {
        echo"您输入的年份{$year}必须是整数<br>";
      }else {
        $year+=0;
         if(is_int($year))  {
           if($year%4==0  && $year%100==0  || $year%400==0)  {
             echo "{$year}是闰年";
           }else {
             echo "{$year}是平年";
           }
         }else {
           echo '您输入的'.$year.'不是整数';
         }
      }
    }*/




        /*$sum=0;
        for($i=1;$i<=100;$i++){
            $sum+=$i;
        }
        echo"1加到100的和是：{$sum}";*/



        /*if(isset($_POST['button']))://
        $num=$_POST['num'];
        if($num=='' ||  !is_numeric($num)):
        echo '请输入数字';
        else:
            $num+= 0;
        if(is_int($num)):
            echo $num%2==0?"($num)是偶数":"($num)是奇数";
        else:
            echo"您输入的不是整数";
        endif;
    endif;
endif;*/

        $sum=0;
        for($a=1;$a<=100;$a++){
            $sum+=$a;
            echo"1加到100的和是：{$sum}";


        };




?>
<form method="post" action="">
    语文成绩：<input type="text" name="ch"><br />
    数学成绩：<input type="text" name="math"><br />
    <input type="submit" name="button" value="判断成绩">
</form>

<form method="post" action="">
  请输入年份： <input type="text" name="year"><br>
  <input type="submit" name="bt1" value="判断闰年">
</form>